]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
runDialog: Disable restart command on wayland
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 27 Feb 2015 18:34:45 +0000 (19:34 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 3 Mar 2015 19:09:06 +0000 (20:09 +0100)
Clients can be expected to deal with the WM going away temporarily,
but not the display server - so when running as wayland compositor,
a restart is generally a fancy way of killing the user session, and
there's little we can do about it except for preventing the user to
shoot herself in the foot by throwing an error.

https://bugzilla.gnome.org/show_bug.cgi?id=741665

js/ui/runDialog.js

index 9c9ee6706e46996b430e640aeda19a373143ac35..495567f0320f65e00fec8a042d86b61d7532c3b7 100644 (file)
@@ -272,6 +272,10 @@ const RunDialog = new Lang.Class({
     },
 
     _restart: function() {
+        if (Meta.is_wayland_compositor()) {
+            this._showError('Restart is not available on Wayland');
+            return;
+        }
         this._shouldFadeOut = false;
         this.close();
         Meta.restart(_("Restarting…"));